package com.jdz.controller.portal;

import com.jdz.common.Const;
import com.jdz.common.ServerResponse;
import com.jdz.pojo.ClassNames;
import com.jdz.service.IClassNamesService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * Created by sun
 **/
@Controller
@RequestMapping("/class")
public class ClassNamesController {

    @Autowired
    IClassNamesService iClassNamesService;

    /**
     * 获取所有班级
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "list.do",method = RequestMethod.POST)
    public ServerResponse<List<ClassNames>> list(@RequestParam(value = "professionName") String professionName){

        return iClassNamesService.list(professionName);
    }


}
